<template>
	<view>
		<view class="viewCon">
			<view class="inputView">
				<view class="text_label">
					<text>名称</text>
				</view>
				<u-input  v-model="mapData.unCode" placeholder="请输入名称"></u-input>
			</view>


			<view class="inputView">
				<view class="text_label">
					<text>发布日期</text>
				</view>
				<dyDate @getData='(date)=>{mapData.chnNameAndDescribe=date}' style='margin:  0 0 0 20px;'></dyDate>
			</view>


			<view class="btn" @click="queryClick">
				<text>查询</text>
			</view>
			<view class="btn" style="background-color:#5BB5F8 ;" @click="resetClick">
				<text>重置</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		knowDgoodsQuery
	} from '@/common/api/req.js'
	import dyDate from '@/components/dy-Date/dy-Date.vue'
	export default {
		components: {
			dyDate,
		},
		data() {
			return {
				mapData: {
					unCode: '',
					chnNameAndDescribe: "",
				},
				current: 1,
				size: 10,
				show: false,

			};
		},
		methods: {
			queryClick() {
				knowDgoodsQuery({
					...this.mapData,
					current: this.current,
					size: this.size
				}).then(res => {

					let data = res.data.data.records
					this.$goBack('../knowledge/knowledge_danger?data=' + encodeURIComponent(JSON.stringify(data)),
						5);
				})


			},
			resetClick() {
				this.mapData = {}
			}


		}
	}
</script>

<style lang="scss">
	.viewCon {
		padding: 30rpx;



		.inputView {
			display: flex;
			align-items: center;
			margin-top: 20rpx;

			.text_label {
				width: 160rpx;
				text {
					font-size: 14px;
				}
			}

			.ipt {
				background-color: #F5F7FA;
				// margin-left: 20rpx;
			}
		}

		.btn {
			width: 400rpx;
			height: 80rpx;
			background-color: #148AE4;
			margin: 0 auto;
			margin-top: 20px;
			display: flex;
			justify-content: center;
			align-items: center;
			border-radius: 20rpx;

			text {
				font-size: 32rpx;
				color: #fff;
			}

		}
	}
</style>
